<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>博客添加</title>
    <!-- 1. 导入CSS的全局样式 -->
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
    <!-- 2. jQuery导入，建议使用1.9以上的版本 -->
    <script src="${pageContext.request.contextPath}/js/jquery-2.1.0.min.js"></script>
    <!-- 3. 导入bootstrap的js文件 -->
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <a class="btn btn-primary" href="${pageContext.request.contextPath}/UserBlog/findBlogByPage">返回</a>

    <form action="${pageContext.request.contextPath}/UserBlog/addBlog?columnId=${requestScope.columnId}" method="post">
        <%--添加专栏专栏用的--%>
        <a href="${pageContext.request.contextPath}/Column/columnPage?ccurrentPage=${requestScope.columnPageBean.currentPage-1}&crows=5&columnId=${requestScope.columnId}">Previous</a>
        <ul class="nav nav-tabs">
            <c:if test="${requestScope.columnPageBean.totalCount!=0}">
                <c:forEach items="${requestScope.columnPageBean.list}" var="column" varStatus="s">
                    <li role="presentation">
                        <input type="radio" name="addColumnId" value="${column.id}">
                        <a href="${pageContext.request.contextPath}/Column/columnPage?columnId=${column.id}"> ${column.name}</a>
                    </li>
                </c:forEach>
            </c:if>

            <c:if test="${requestScope.columnPageBean.totalCount==0}">
                <li> 目前该专栏没有子专栏哦</li>
            </c:if>
        </ul>
        <a href="${pageContext.request.contextPath}/Column/columnPage?ccurrentPage=${requestScope.columnPageBean.currentPage+1}&crows=5&columnId=${requestScope.columnId}">Next</a>
        <div class="form-group">
            <input type="text" class="form-control" name="addColumn" placeholder="没有想要的专栏?">
        </div>
        <br>
        <a class="btn btn-primary" href="${pageContext.request.contextPath}/Column/columnPage">返回</a>


        <!-- 显示的信息框 -->
        <c:if test="${requestScope.blogBoolean!=null}">
            <div class="alert alert-warning alert-dismissible" role="alert">
                <button type="button" class="close" data-dismiss="alert">
                    <span>&times;</span></button>
                <strong>${requestScope.blogBoolean}</strong>
            </div>
        </c:if>


        <h3><small>标题</small></h3>
        <input type="text" class="form-control" name="title" placeholder="请输入标题">
        <h3><small>文章</small></h3>
        <textarea class="form-control" rows="25" name="content" placeholder="请输入内容"></textarea>

        <div class="form-group" style="text-align: center;">
            <input class="btn btn btn-primary" type="submit" value="提交">
        </div>
    </form>


</div>
</body>
</html>
